<template>
  <div>
    <!-- 整个页面的外层容器 -->
    <el-container>
      <!-- 顶栏 -->
      <el-header class="layout-header">
        <h1>酷鲨商城运营管理平台</h1>
      </el-header>
      <!-- 下半部分区域 -->
      <el-container class="layout-body">
        <!-- 左侧边栏 -->
        <el-aside class="layout-aside">
          <el-menu
              router
              :default-active="$router.currentRoute.path"
              class="el-menu-vertical-demo"
              background-color="#222c32"
              text-color="#fff"
              active-text-color="#fff">
            <!-- 首页 -->
            <el-menu-item index="/index">
              <i class="el-icon-s-home"></i>
              <span>首页</span>
            </el-menu-item>
            <!-- 品牌模块 -->
            <el-submenu index="2">
              <template slot="title">
                <i class="el-icon-s-tools"></i>
                <span>品牌模块</span>
              </template>
              <el-menu-item index="/brand/add-new">
                <i class="el-icon-circle-plus"></i>
                <span>添加品牌</span>
              </el-menu-item>
              <el-menu-item index="/brand/list">
                <i class="el-icon-s-operation"></i>
                <span>品牌列表</span>
              </el-menu-item>
            </el-submenu>
            <!-- 类别模块 -->
            <el-submenu index="3">
              <template slot="title">
                <i class="el-icon-s-tools"></i>
                <span>类别模块</span>
              </template>
              <el-menu-item index="/category/add-new">
                <i class="el-icon-circle-plus"></i>
                <span>添加类别</span>
              </el-menu-item>
              <el-menu-item index="/category/list">
                <i class="el-icon-s-operation"></i>
                <span>类别列表</span>
              </el-menu-item>
            </el-submenu>
            <!-- 相册模块 -->
            <el-submenu index="4">
              <template slot="title">
                <i class="el-icon-s-tools"></i>
                <span>相册模块</span>
              </template>
              <el-menu-item index="/album/add-new">
                <i class="el-icon-circle-plus"></i>
                <span>添加相册</span>
              </el-menu-item>
              <el-menu-item index="/album/list">
                <i class="el-icon-s-operation"></i>
                <span>相册列表</span>
              </el-menu-item>
            </el-submenu>
          </el-menu>
        </el-aside>
        <!-- 主体 -->
        <el-main class="layout-main">
          <router-view/>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<style>
.layout-header {
  background: #1684b0;
  color: #fff;

}

.layout-header h1 {
  line-height: 60px;
}

.layout-body {
  position: absolute;
  top: 60px;
  bottom: 0;
  left: 0;
  right: 0;
}

.layout-aside {
  background: #222c32;
}

.layout-aside i {
  color: #fff !important;
}

.layout-main {
  background-color: white;

}

.el-menu-item.is-active {
  background: #2d3c4d !important;
}
</style>

<script>
export default {}
</script>
